import requests

import article
import home



def crawl():
    list = []
    list1 = home.home_data()
    list2 = next.next_data(len(list1))
    list.extend(list1)
    list.extend(list2)
    print(len(list))
    for i in list:
        article.image_list(i)

if __name__ == '__main__':
    requests.packages.urllib3.disable_warnings()
    # 增加重试连接次数
    requests.adapters.DEFAULT_RETRIES = 5
    # 关闭多余的连接 requests使用了urllib3库，默认的http connection是keep - alive的，requests设置False关闭。 操作方法:
    s = requests.session()
    s.keep_alive = False
    crawl()


